// 
// 
// 

#include "PellTargetClass.h"

void PellTargetClass::init()
{
	AmbientFsrReading = FsrReading();
}

PellTargetClass::PellTargetClass(int ledr, int ledg, int ledb, int fsr){
	_ledr = ledr;
	_ledb = ledb;
	_ledg = ledg;
	_fsr = fsr;

	/* Set pin modes*/
	pinMode(_ledr, OUTPUT);
	pinMode(_ledb, OUTPUT);
	pinMode(_ledg, OUTPUT);

}

/**
<summary>Turns the red light for this target on</summary> 
*/
void PellTargetClass::RedOn(){
	 digitalWrite(_ledr, HIGH);
}

void PellTargetClass::RedOff(){
	digitalWrite(_ledr, LOW);
}

void PellTargetClass::BlueOn(){
	digitalWrite(_ledb, HIGH);
}

void PellTargetClass::BlueOff(){
	digitalWrite(_ledb, LOW);
}

void PellTargetClass::GreenOn(){
	digitalWrite(_ledg, HIGH);
}

void PellTargetClass::GreenOff(){
	digitalWrite(_ledg, LOW);
}

int PellTargetClass::FsrReading(){
	return analogRead(_fsr);
}



